package com.example.order.service.impl;

import com.example.order.mapper.StorageMapper;
import com.example.order.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service
public class StorageServiceImpl implements StorageService {

    @Autowired
    private StorageMapper storageMapper;

    @Transactional
    @Override
    public void decrease(Long productId,Integer num) {
        storageMapper.decrease(productId,num);
    }
}
